/*
 * v1.1 by tonydon site:txdnet.cn
 * netbeansIDE 7.1
 */
package cn.txdnet.txweb.utils;

import java.util.Properties;
import txdnet.util.FileUtil;
import txdnet.util.Logger;

/**
 *
 * @author txdnet
 */
public class Message {
    
    private Message(){}
    
    public static String MSG_VCODE_ERR;
    public static String MSG_FIELD_ERR;
    public static String MSG_PARAM_ERR;
    public static String MSG_VALUE_NULL;
    public static String MSG_VALID_ERR;
    public static String MSG_SUCCESS;
    public static String MSG_FAIL;
    
    public static void loadKeys(){
        try{
        Properties p = FileUtil.readPropertiesFile(Message.class.getResourceAsStream("/message.properties"));
        MSG_VCODE_ERR = p.getProperty("MSG_VCODE_ERR");
        MSG_FIELD_ERR = p.getProperty("MSG_FIELD_ERR");
        MSG_PARAM_ERR = p.getProperty("MSG_PARAM_ERR");
        MSG_VALUE_NULL = p.getProperty("MSG_VALUE_NULL");
        MSG_VALID_ERR = p.getProperty("MSG_VALID_ERR");
        MSG_SUCCESS = p.getProperty("MSG_SUCCESS");
        MSG_FAIL = p.getProperty("MSG_FAIL");
        }catch(Exception e){
            Logger.error(Message.class, e.toString());
        }
    }
    static{
        loadKeys();
    }
}
